刷題王
免費開始練習
歷屆試題
›
hce_nsysu
›
計算機概論與程式設計 — 主題練習
📚 計算機概論與程式設計
C 語言程式設計基礎與陣列記憶體配置
79
道考古題
4
個年度
114年 (7)
113年 (14)
112年 (14)
111年 (44)
📝 歷屆考古題
114年 hce_nsysu
第6題
What is printed by the following C program? int k = 18; printf("%d \n", k | (-k)); // | is bit…
查看 AI 詳解 →
114年 hce_nsysu
第11題
What is printed by the following C program? int f(int &x, int y) { x = y * 2; y = x + 3; r…
查看 AI 詳解 →
114年 hce_nsysu
第19題
What is printed by the following C program? int x = 6; int y = 23; int z = ++x + y--;…
查看 AI 詳解 →
114年 hce_nsysu
第42題
What is printed by the following C program? int a = 12, b = -2; printf("%d \n", a & b);…
查看 AI 詳解 →
114年 hce_nsysu
第44題
What is printed by the following C program? int a = 17, b = -2; printf("%d \n", (a + b) >> 2…
查看 AI 詳解 →
114年 hce_nsysu
第46題
In the ASCII code, ‘A’ is encoded as decimal 65. What is the ASCII code of ‘W’?
查看 AI 詳解 →
114年 hce_nsysu
第49題
What is printed by the following C/C++ program? int a[]={3, -5, 2, -7, -3, 4, 3}; int n=0;…
查看 AI 詳解 →
113年 hce_nsysu
第5題
Which one of the following binary representation is the two's compliment of -107?
查看 AI 詳解 →
113年 hce_nsysu
第6題
For a three-dimensional array A stored in the row-major order with dimensions 3x4x5, if the address…
查看 AI 詳解 →
113年 hce_nsysu
第9題
Assume there are seven characters, C1, C2, C3, C4, C5, C6, and C7, and the frequency (in parentheses…
查看 AI 詳解 →
113年 hce_nsysu
第12題
For the given array a=[6, 10, 5, 7, 8], using the following code for bubble sort: ```c for(int i = 0…
查看 AI 詳解 →
113年 hce_nsysu
第13題
Consider the arithmetic right shift operation (SRA) in computer architecture. If we perform an SRA o…
查看 AI 詳解 →
113年 hce_nsysu
第22題
Assuming that $t$ is an array and $tPtr$ is a pointer pointing to the first element of that array an…
查看 AI 詳解 →
113年 hce_nsysu
第26題
Given the following program in C++. Which statement is correct? ```cpp #include
using nam…
查看 AI 詳解 →
113年 hce_nsysu
第29題
Consider the following code in C. If the input sequence is 0, 3, 1, -1. What is the output of the fi…
查看 AI 詳解 →
113年 hce_nsysu
第34題
What is the output of the following C code? ```c #include
int main() { int a[8] = {6,…
查看 AI 詳解 →
113年 hce_nsysu
第35題
Which of the following arithmetic is NOT allowed on pointers?
查看 AI 詳解 →
113年 hce_nsysu
第39題
The following code in C program ```c char str[] = "NSYSU"; ``` is equivalent to which of the followi…
查看 AI 詳解 →
113年 hce_nsysu
第45題
Given the following piece of code, which one of the following statements is correct? ```c #include <…
查看 AI 詳解 →
113年 hce_nsysu
第49題
Given the following piece of code, which one of the following statements is NOT correct? ```c #inclu…
查看 AI 詳解 →
113年 hce_nsysu
第50題
What is the output of the following C program code? ```cpp #include
int &max(int &i, int…
查看 AI 詳解 →
112年 hce_nsysu
第1題
What is printed by the following C/C++ program? char a[ ]= "ABCDE", b[ ]= "74623"; printf("%d \n", (…
查看 AI 詳解 →
112年 hce_nsysu
第2題
How many bits are used in the IPv6 address?
查看 AI 詳解 →
112年 hce_nsysu
第6題
What is printed by the following C/C++ program? int a[10], y=2; a[1]=1; a[2]=3; a[3]=5; printf("%d \…
查看 AI 詳解 →
112年 hce_nsysu
第9題
What is printed by the following C/C++ program? int a[ ]={1, -2, 2, -1, 3, -1, 2}; int sum = 0, m =…
查看 AI 詳解 →
112年 hce_nsysu
第14題
Which of the following is the decimal representation of $(F3A5)_{16}$?
查看 AI 詳解 →
112年 hce_nsysu
第17題
Which radix r is correct for $(B7)_{16} = (267)_r$?
查看 AI 詳解 →
112年 hce_nsysu
第20題
How many operations can be defined when a machine equips a control bus of sixteen wires?
查看 AI 詳解 →
112年 hce_nsysu
第24題
Which operation can be taken to flip all of the bits in a binary string with a mask of all 1's binar…
查看 AI 詳解 →
112年 hce_nsysu
第28題
What is the output of the following C program? int i = 8, j = 7, *s = &i, *t = &j; printf("%d\n", 6*…
查看 AI 詳解 →
顯示更多題目 (49 題)
112年 hce_nsysu
第29題
What is the output of the following C program? int M = 10; int N = 0; for (int i = 1; i < M; i++) {…
查看 AI 詳解 →
112年 hce_nsysu
第30題
What is the output of the following C program? If a = 3.0, b=5.0, and c=2.0, then what is printed by…
查看 AI 詳解 →
112年 hce_nsysu
第37題
Consider the following code in C program: #include
void swap (int a, int b, int c); int ma…
查看 AI 詳解 →
112年 hce_nsysu
第38題
Consider the following code in C program. #include
int max(int a, int b){ if (a>b) return…
查看 AI 詳解 →
112年 hce_nsysu
第39題
Consider the following code in C program. #include
int guess(int a, int b){ if (a>b) retur…
查看 AI 詳解 →
111年 hce_nsysu
第1題
Which of the following is the binary representation of (6.625)10?
查看 AI 詳解 →
111年 hce_nsysu
第2題
If you have a disk that has a capacity of Petabyte (PB), that is equal to
查看 AI 詳解 →
111年 hce_nsysu
第4題
Which of the following statement about the Unicode is not true?
查看 AI 詳解 →
111年 hce_nsysu
第12題
x = 01001010, y = 11001100. What is the Hamming distance between x and y?
查看 AI 詳解 →
111年 hce_nsysu
第16題
If the function `int volume(int x = 1,int y = 1,int z = 1);` is called by the expression `volume(7,8…
查看 AI 詳解 →
111年 hce_nsysu
第17題
If a=1.0, b=6.0 and c=4.0, then what is printed by `printf("%.2f", sqrt(a+b*c));`
查看 AI 詳解 →
111年 hce_nsysu
第18題
Which of the following C code is used to declare a two-dimensional array of integers with 5 rows and…
查看 AI 詳解 →
111年 hce_nsysu
第19題
What is the output of the following statements? ```c int x = 3; switch(x+1) { case 3…
查看 AI 詳解 →
111年 hce_nsysu
第23題
Which of the following statements about the format specifier for `printf()` function in C is incorre…
查看 AI 詳解 →
111年 hce_nsysu
第24題
Consider an array declaration `int data[5]={1,2,3,4,5};` in C. What is the value of `data[5]`?
查看 AI 詳解 →
111年 hce_nsysu
第25題
Which of the following C code is used to declare two pointers of integer?
查看 AI 詳解 →
111年 hce_nsysu
第26題
Which of the following code could not be used to ignore all remaining characters in the current inpu…
查看 AI 詳解 →
111年 hce_nsysu
第27題
What is the output of the following program? ```c int a[10] = {3,2,3,4,5,4,7,1,3,2}; int b[1…
查看 AI 詳解 →
111年 hce_nsysu
第29題
What is the output of this code in C++? ```cpp #include
using namespace std; c…
查看 AI 詳解 →
111年 hce_nsysu
第30題
Assuming that `t` is an array and `tPtr` is a pointer to that array, which expression refers to the…
查看 AI 詳解 →
111年 hce_nsysu
第34題
What is the smallest negative number using 1’s complement in a 64-bits computer?
查看 AI 詳解 →
111年 hce_nsysu
第38題
Given a row-major array A(i,j) is defined as $-2 \le i \le 6, -6 \le j \le -2$, where the location o…
查看 AI 詳解 →
111年 hce_nsysu
第41題
Which of the following bit patterns violates odd parity check?
查看 AI 詳解 →
111年 hce_nsysu
第55題
Which of the following statement is true?
查看 AI 詳解 →
111年 hce_nsysu
第61題
Which of the following is not a correct way to initialize an array?
查看 AI 詳解 →
111年 hce_nsysu
第62題
Polymorphism is implemented through:
查看 AI 詳解 →
111年 hce_nsysu
第63題
A copy constructor must receive its argument by reference instead of by value because:
查看 AI 詳解 →
111年 hce_nsysu
第64題
What will be the output of the following program? ```c #include
void swap(int a, i…
查看 AI 詳解 →
111年 hce_nsysu
第66題
The definition `char string1[] = "bird";` is equivalent to:
查看 AI 詳解 →
111年 hce_nsysu
第67題
Consider the following C code fragment: ```c int i=10; do { printf("%d ", i*=2.5);…
查看 AI 詳解 →
111年 hce_nsysu
第68題
Call-by-reference can achieve the security of call-by-value when:
查看 AI 詳解 →
111年 hce_nsysu
第69題
`Student` is a base class and `TA` is a derived class, with a redefined non-`virtual` `coding` funct…
查看 AI 詳解 →
111年 hce_nsysu
第70題
The array subscript operator `[]`, when overloaded, cannot:
查看 AI 詳解 →
111年 hce_nsysu
第71題
Which of the following arithmetic is not allowed on pointers?
查看 AI 詳解 →
111年 hce_nsysu
第73題
What expression should be in "AAA"?
查看 AI 詳解 →
111年 hce_nsysu
第74題
What expression should be in "BBB"?
查看 AI 詳解 →
111年 hce_nsysu
第75題
What expression should be in "CCC"?
查看 AI 詳解 →
111年 hce_nsysu
第76題
What will be the declaration of the following requirements? (i.) An array of 10 pointers to integer…
查看 AI 詳解 →
111年 hce_nsysu
第77題
Which of the following gives the number of elements in the array `int a[]`?
查看 AI 詳解 →
111年 hce_nsysu
第78題
Consider the following function and code segment. ```cpp void me( int x, int & y ) {…
查看 AI 詳解 →
111年 hce_nsysu
第79題
Assume this code fragment is embedded in an otherwise correct and complete program. What should be t…
查看 AI 詳解 →
111年 hce_nsysu
第80題
Consider the following C code fragment: ```c int x=38; int *p=&x; ``` Which of the following…
查看 AI 詳解 →
111年 hce_nsysu
第81題
Which of the following C statements is incorrect?
查看 AI 詳解 →
111年 hce_nsysu
第82題
Suppose the output of the following C code fragment is 0xffff00003a04: ```c int x=38; int *p…
查看 AI 詳解 →
111年 hce_nsysu
第83題
If the line: `friend class A;` appears in class B, and the line: `friend class B;` appears in class…
查看 AI 詳解 →
111年 hce_nsysu
第84題
Since the postfix increment operator returns objects by value and the prefix increment operator retu…
查看 AI 詳解 →
111年 hce_nsysu
第85題
`virtual` destructors must be used when:
查看 AI 詳解 →
111年 hce_nsysu
第89題
Consider the following C code fragment: ```c char *str1="Hello"; char str2[]={'W', 'o', 'r',…
查看 AI 詳解 →
111年 hce_nsysu
第90題
Consider the following C++ code fragment: ```cpp int &max(int &a, int &b) { if(a>b)…
查看 AI 詳解 →
💡 每一題都有 AI 量身打造的超詳細解析
不只告訴你答案對在哪,還會分析你選的選項為什麼錯
開始練習「C 語言程式設計基礎與陣列記憶體配置」🚀